import Cookies from 'js-cookie'

export default class Token {
  private static readonly token: string = 'token'

  public static set(token: string) {
    Cookies.set(this.token, token)
  }

  public static get(): string {
    return Cookies.get(this.token)
  }

  public static hasToken(): boolean {
    return !!Cookies.get(this.token)
  }

  public static remove() {
    Cookies.remove(this.token)
  }
}